﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DataTransfer;
namespace Gui
{
    public partial class frmThemCachDung : DevComponents.DotNetBar.Office2007Form
    {
        CachDungBus cachdungBus;
        public frmThemCachDung(frmDanhSachCachDung frm,CachDung info=null)
        {
            InitializeComponent();
        }

        private void frmThemCachDung_Load(object sender, EventArgs e)
        {

        }

        private void buttonX2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnNhapCachDung_Click(object sender, EventArgs e)
        {
                    try 
	        {
                cachdungBus = new CachDungBus();
                CachDung info = new CachDung();
                info.TenCachDung = txtCachDung.Text;
                cachdungBus.Insert(info);
                MessageBox.Show("Insert Success");
                    }
	        catch (Exception ex)
	        {
                MessageBox.Show("Insert Error:" + ex.Message);
		        //throw;
	        }
            
        }

        private void btnCapNhat_Click(object sender, EventArgs e)
        {

        }
    }
}
